<div class="modal-body">
    <div class="container-fluid form-horizontal ">
      <div class="panel panel-info form-horizontal">
		<div class="panel-heading ">
			新建优惠券产品
		</div>
		<div class="panel-body">
			<div class="container-fluid">
				<div class="  wrapper-md ng-scope" style="text-align: center">
                    <h1 class="m-n font-thin h3 ng-binding">新建优惠券产品</h1>
                </div>

                <div class="form-group">
                    <label class="control-label col-sm-offset-2 col-sm-2">优惠券产品名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" ng-model="para.product_name" placeholder="优惠券产品名称"> 
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-sm-offset-2 col-sm-2">库存类型</label>
                    <div class="col-sm-4">
                        <div class="radio">
                            <label>
                                <input type="radio" id="stock1" value="1" ng-model="para.stock_type" checked>启用
                            </label>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <label>
                                <input type="radio" id="stock2" value="0" ng-model="para.stock_type">不启用
                            </label>
                        </div>
                    </div>
                </div>

                <div class="form-group" ng-show="para.stock_type == '1'">
                    <label class="control-label col-sm-offset-2 col-sm-2">库存数</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" ng-model="para.stock_num" placeholder="库存数"> 
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-sm-offset-2 col-sm-2">最大数量限制</label>
                    <div class="col-sm-4">
                        <div class="radio">
                            <label>
                                <input type="radio" id="limit1" value="0" ng-model="para.max_limit" checked>限制
                            </label>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <label>
                                <input type="radio" id="limit2" value="-1" ng-model="para.max_limit">不限制
                            </label>
                        </div>
                    </div>
                </div>

                <div class="form-group" ng-show="para.max_limit == '0'">
                    <label class="control-label col-sm-offset-2 col-sm-2">最大限制数量</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" ng-model="para.max_limit_num" placeholder="限制数量"> 
                    </div>
                </div>

                <div class="col-sm-offset-5 col-sm-2" ng-show="status != '1'">
                    <button class="btn btn-block btn-info" ng-click="savesubmit()" ng-disabled="ceratesuccess == '1'">第一步创建产品</button>
                </div>

                <!--<div class="col-sm-12" >
                    <label style="width:100%; height:5px; color:black"></label>
                </div>-->

                <div class="col-sm-12 mt20" ng-keyup="myKeyup($event)">
                    <div class="col-sm-2 pull-right" style="padding-bottom:10px" ng-show="status != '1'">
                            <button class="btn btn-block btn-info" ng-click="add()">第二步添加优惠券</button>
                        </div>
                <!--<div class="panel panel-default">
                <div class="panel-body">
                <div class="col-sm-12">

                    <div class="row ">
                        <div class="col-sm-2 pull-right">
                            <button class="btn btn-block btn-info" ng-click="add()">添加优惠券</button>
                        </div>
                    </div>
                </div>
                </div>
                </div>-->
                <!-- searchArea -->

                <!--<div class="panel panel-default">-->
                    <div class="panel-body">
                        <table class="table table-condensed table-hover table-bordered" style="display: table; width: 100%;table-layout:fixed;">
                            <thead>
                                <tr>
                                    <th class="text-center" style="width:10%">优惠券名称</th>
                                    <th class="text-center" style="width:7%">价格</th>
                                    <th class="text-center" style="width:15%">优惠券种类</th>
                                    <th class="text-center" style="width:15%">优惠券规则</th>
                                    <th class="text-center" style="width:10%">有效期始</th>
                                    <th class="text-center" style="width:10%">有效期止</th>
                                    <th class="text-center" style="width:20%">描述</th>
                                    <th class="text-center" style="width:13%">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="obj in array track by $index">
                                    <td class="text-center" style="width:10%">{{obj.coupon_name || obj.name}}</td>
                                    <td class="text-center" style="width:7%">{{(obj.money / 100) | currency : '¥'}}</td>
                                    <td class="text-center" style="width:10%">{{obj.type_name || obj.type}}</td>
                                    <td class="text-center" style="width:10%">{{obj.rule_name || obj.rule}}</td>
                                    <td class="text-center" style="width:10%">{{obj.start_date}}</td>
                                    <td class="text-center" style="width:10%">{{obj.end_date}}</td>
                                    <td class="text-center" style="width:20%">
                                        <div class="ellipsis" style="max-width:100%;display:block;overflow: hidden;white-space: nowrap;-o-text-overflow: ellipsis;text-overflow: ellipsis;padding-left: 0px;padding-right:0px;" title="{{obj.description}}">{{obj.description}}</div>
                                    </td>
                                    <td class="text-center" style="width:13%">
                                        <a ng-click="edit(obj)" class="btn btn-info btn-sm" ng-show="status == '2' || status == '0'">编辑</a>
                                        <a ng-click="delete(obj.id)" class="btn btn-primary btn-sm" ng-show="status == '2' || status == '0'">删除</a>  
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <div class="text-right">
                            <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="load()" previous-text="上一页" next-text="下一页"
                                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                                class="m-t-none m-b">
                            </pagination>
                        </div>
                    </div>
                <!--</div>-->

                <!--<div class="col-sm-offset-5 col-sm-2" ng-show="status != '1' && status != '0'">
                    <button class="btn btn-block btn-info" ng-click="submit()">第二步保存子表信息</button>
                </div>-->

                </div>

            </div>
        </div>
    </div>
</div>
